﻿using DelegetAndEventTest.PbulishAndSubscribe;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DelegetAndEventTest
{
    /// <summary>
    /// 事件调度中心
    /// </summary>
    public class Dispatch
    {
        public event MessageDelegateHandler WeatherReport;
        public void ReciveMessage(string message)
        {
            WeatherReport?.Invoke(this, new WeatherEventArgs { Message = "今天有大雨！！，请注意关窗！！" });
        }
    }
}
